<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    isActive: Boolean,
    text: String,
  },
});
</script>

<template>
  <view class="type-item">
    <view class="type-item-active" v-if="isActive">{{ text }}</view>
    <view class="type-item-text" v-else>{{ text }}</view>
  </view>
</template>

<style lang="scss">
.type-item {
  display: flex;
  align-items: center;
  height: 60rpx;

  .type-item-text {
    padding: 0 24rpx;
    font-size: 26rpx;
    color: #ae4137;
    line-height: 52rpx;
    border-radius: 26rpx;
    background-color: rgba(255, 121, 0, 0.05);
  }

  .type-item-active {
    padding: 0 22rpx;
    font-size: 28rpx;
    color: #af2f24;
    line-height: 56rpx;
    font-weight: bold;
    border-radius: 32rpx;
    border: 2rpx solid #d8853c;
    background-color: #ffffff;
  }
}
</style>